#绝对布局  窗口指定每一个控件显示的坐标和大小来布局的
import sys
from  PyQt5.QtWidgets import *
class Example(QWidget):
    def __init__(self,parent=None):
        super(Example,self).__init__(parent)
        self.setWindowTitle("水平布局案例")
        hlayout=QHBoxLayout()
        hlayout.addWidget(QPushButton("1"))
        hlayout.addWidget(QPushButton("2"))
        hlayout.addWidget(QPushButton("3"))
        hlayout.addWidget(QPushButton("4"))
        hlayout.addWidget(QPushButton("5"))

        hlayout.setSpacing(0)
        self.setLayout(hlayout)

if __name__ == '__main__':
    app=QApplication(sys.argv)
    demo=Example()
    demo.show()
    sys.exit(app.exec_())
